// ml:run = $bin < input
#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstring>

template <class T>
T abs(T x) { return x < 0 ? -x : x; }

struct data { double x, y, s, r, d, t; };
bool operator<(data const& a, data const& b)
{
    return a.t < b.t;
}

double const eps = 1e-7;
int const maxn = 200;
data da[maxn];
int n;
double hp;

double dis(double x1, double y1, double x2, double y2)
{
    double x = (x1 - x2) * (x1 - x2);
    double y = (y1 - y2) * (y1 - y2);
    return sqrt(x + y);
}

bool alive()
{
    if (hp < eps) return false;
    std::sort(da, da + n);
    double sum = 0;
    for (int i = 0; i < n; i++) {
        if (da[i].t <= 100.0 + sum + eps) {
            sum += da[i].s;
            hp -= da[i].d;
        } else
            break;
    }
    return hp > eps;
}

int main()
{
    std::ios_base::sync_with_stdio(false);
    while (std::cin >> n) {
        for (int i = 0; i < n; i++) {
            std::cin >> da[i].x >> da[i].y >> da[i].s >> da[i].r >> da[i].d;
            da[i].y = abs(da[i].y);
            da[i].t = dis(da[i].x, da[i].y, 100, 0) - da[i].r;
            da[i].t = std::max(da[i].t, 0.0);
        }
        std::cin >> hp;
        if (alive())
            std::cout << "Safe!\n";
        else
            std::cout << "Danger!\n";
    }
}

